<?php

/**
 * +----------------------------------------------------------------------
 * | 后台接口
 * | 需要验证登录信息
 * |
 * | 通过`admin.js`调用此接口会自动在`header`中增加`XX-Device-Type`和`Authorization`，否则需要手动添加
 * | eg:
 * |  $.post('http://{domain name}/plugin/dfer_thinkcmf_tools/api_admin/index');
 * |
 * |  $.ajax({  
 * |   url: "/plugin/dfer_thinkcmf_tools/api_admin/index",
 * |   type: 'POST',  
 * |   headers: {  
 * |    'Authorization': localStorage.getItem("token"),
 * |    'XX-Device-Type': 'web'  
 * |   },
 * |   data:{},
 * |   success: function(response) {  
 * |    console.log('Success:', response);  
 * |   },  
 * |   error: function(xhr, status, error) {  
 * |    console.error('Error:', error);  
 * |   }  
 * |  });
 * +----------------------------------------------------------------------
 *                                            ...     .............
 *                                          ..   .:!o&*&&&&&ooooo&; .
 *                                        ..  .!*%*o!;.
 *                                      ..  !*%*!.      ...
 *                                     .  ;$$!.   .....
 *                          ........... .*#&   ...
 *                                     :$$: ...
 *                          .;;;;;;;:::#%      ...
 *                        . *@ooooo&&&#@***&&;.   .
 *                        . *@       .@%.::;&%$*!. . .
 *          ................!@;......$@:      :@@$.
 *                          .@!   ..!@&.:::::::*@@*.:..............
 *        . :!!!!!!!!!!ooooo&@$*%%%*#@&*&&&&&&&*@@$&&&oooooooooooo.
 *        . :!!!!!!!!;;!;;:::@#;::.;@*         *@@o
 *                           @$    &@!.....  .*@@&................
 *          ................:@* .  ##.     .o#@%;
 *                        . &@%..:;@$:;!o&*$#*;  ..
 *                        . ;@@#$$$@#**&o!;:   ..
 *                           :;:: !@;        ..
 *                               ;@*........
 *                       ....   !@* ..
 *                 ......    .!%$! ..     | AUTHOR: dfer
 *         ......        .;o*%*!  .       | EMAIL: df_business@qq.com
 *                .:;;o&***o;.   .        | QQ: 3504725309
 *        .;;!o&****&&o;:.    ..          | WEBSITE: http://www.dfer.site
 * +----------------------------------------------------------------------
 *
 */

namespace plugins\dfer_thinkcmf_tools\controller;

class ApiAdminController extends RestAdminBaseController
{
    /**
     * http://{domain name}/plugin/dfer_thinkcmf_tools/api_admin/index
     */
    public function index()
    {
        $this->success('success', ['hello' => 'hello ThinkCMF Admin!']);
    }
}
